package images

import (
	"fmt"
)

// Dot 点.
type Dot struct {
	X        int
	Y        int
	Distance int
}

// Space 距离.
func (d *Dot) Space(o *Dot) int {
	return Abs(d.X-o.X) + Abs(d.Y-o.Y)
}

// String 点.
func (d *Dot) String() string {
	return fmt.Sprintf("(%d, %d): %d", d.X, d.Y, d.Distance)
}
